package com.lightsaber.trade.as.dao.device;

import org.springframework.stereotype.Component;
import org.springside.modules.orm.Page;

import com.lightsaber.trade.as.entity.device.Device;
import com.lightsaber.trade.core.dao.BaseDao;

@Component
public class DeviceDao extends BaseDao<Device, String> {

    public Page<Device> findPage(final Device device, final Page<Device> page) {
        like("name", device.getName());
        like("serialNumber", device.getSerialNumber());

        return findPage(page);
    }
}
